﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using DiscoveryLogic.UI.Layouts.Converters;

namespace DiscoveryLogic.UI.Layouts.Controls
{
    public partial class StatementSummary : UserControl
    {

        #region Constructors

        public StatementSummary()
        {
            try
            {
                InitializeComponent();

                CurrentBalanceValue.Text = ((double)this.Resources["Res_CurrentBalanceValue"]).ToCurrency();
                CreditAvailable.Text = ((double)this.Resources["Res_CreditAvailableValue"]).ToCurrency();
                OverlimitAmount.Text = ((double)this.Resources["Res_OverlimitAmountValue"]).ToCurrency();
                LastStatementBalance.Text = ((double)this.Resources["Res_LastStatementBalanceValue"]).ToCurrency();
                MinimumPayment.Text = ((double)this.Resources["Res_MinimumPaymentValue"]).ToCurrency();
                LastPayment.Text = ((double)this.Resources["Res_LastPaymentValue"]).ToCurrency();
            }
            catch (Exception ex)
            {
                string err = ex.Message;
            }
        }

        #endregion Constructors

        #region Public Methods

            public void Flyout()
            {
                SummaryFlyout.Begin();
                Root.IsHitTestVisible = true;
            }

            public void Flyback()
            {
                SummaryFlyback.Begin();
                Root.IsHitTestVisible = false;
            }

        #endregion Public Methods

    }
}
